<?php
defined('BASEPATH') or exit('No direct script access allowed');
require_once 'DB/MysqlModel.php';

class Permission extends MysqlModel
{

    public $table = 'permission';

    public function __construct()
    {
        parent::__construct();
        parent::setTable($this->table);
    }
    
    /* 查询 */
    public function findByIn($condition, $field = array('*'))
    {
        $table = $this->table;
        $fieldStr = implode(',', $field);
        $select = $this->db->select($fieldStr);
        $from = $this->db->from($table);
        $where = $this->db->where_in($condition['key'], $condition['value']);
        $query = $this->db->get();
        $result = $query->result_array();
        return $result;
    }
}
